<?php
/*
	插件概览
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
if($_RQ['op']=='get'){
	$this->model('model')->checkrole(7);
	$role_id=7;
	$workerids=$this->model('model')->getworkerids($role_id);
	//显示统计数据
	$daytime = mktime(0,0,0,date('m'),date('d'),date('Y'));
	$status4=array(4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,32,33,34,35,36,37,38,39,40,41,42,100);
	$shixue['all']=pdo_count('jy_yxw_member',array('worker'.$role_id.'id'=>$workerids,'storeid'=>$_SESSION['storeid'],'uniacid'=>$_SESSION['uniacid'],'ting2_time >'=>100),'id');
	$shixue['day']=pdo_count('jy_yxw_member',array('worker'.$role_id.'id'=>$workerids,'storeid'=>$_SESSION['storeid'],'uniacid'=>$_SESSION['uniacid'],'ting2_time >'=>$daytime),'id');
	$yuke['day']=pdo_count('jy_yxw_member',array('worker'.$role_id.'id'=>$workerids,'storeid'=>$_SESSION['storeid'],'uniacid'=>$_SESSION['uniacid'],'status'=>$status4,'sxue_time >'=>$daytime),'id');
	$yuke['all']=pdo_count('jy_yxw_member',array('worker'.$role_id.'id'=>$workerids,'storeid'=>$_SESSION['storeid'],'uniacid'=>$_SESSION['uniacid'],'sxue_time >'=>100),'id');
	$ting['day'] = pdo_count('jy_yxw_member',array('worker'.$role_id.'id'=>$workerids,'storeid'=>$_SESSION['storeid'],'uniacid'=>$_SESSION['uniacid'],'ting_time >'=>$daytime));
	$ting['all'] = pdo_count('jy_yxw_member',array('worker'.$role_id.'id'=>$workerids,'storeid'=>$_SESSION['storeid'],'uniacid'=>$_SESSION['uniacid'],'ting_time >'=>100));
	$isbao['day'] = pdo_count('jy_yxw_member',array('worker'.$role_id.'id'=>$workerids,'storeid'=>$_SESSION['storeid'],'uniacid'=>$_SESSION['uniacid'],'status <'=>100,'bao_time >'=>$daytime));
	$isbao['all'] = pdo_count('jy_yxw_member',array('worker'.$role_id.'id'=>$workerids,'storeid'=>$_SESSION['storeid'],'uniacid'=>$_SESSION['uniacid'],'status <'=>100,'bao_time >='=>9));
	
	$htmls=array(
		array('type'=>'data','num'=>12,'one_num'=>3,'title'=>'今日数据/总数据','datas'=>array(
			array('title'=>'体验客户数/总体验客户数','num'=>2,'data'=>array($ting['day'],$ting['all'])),
			array('title'=>'体用客户数/总体用客户数','num'=>2,'data'=>array($shixue['day'],$shixue['all'])),
			array('title'=>'进入试用数/总进入试用数','num'=>2,'data'=>array($yuke['day'],$yuke['all'])),
			array('title'=>'成交数/总成交数','num'=>2,'data'=>array($isbao['day'],$isbao['all'])),
		)),
	);
	$return['htmls']=$htmls;
	exi($return);
}